<?php
//$_POST['month']=1;
//$_POST['year']=2019;

//查时间
$info=array();
if ($_POST)
{
    $month=(int)$_POST['month'];     //月
    $year=(int)$_POST['year'];       //年
    $qi=mktime(0,0,0,$month,1,$year);
    $zhong=mktime(0,0,0,$month+1,1,$year);
    $u=$oMysql->get("SELECT title,pubdate,id FROM wenzhang WHERE pubdate>=$qi AND pubdate<$zhong ORDER BY pubdate DESC ");
    for ($i=0;$i<count($u);$i++)
    {
        $info[$i]=$u[$i];
    }
    for ($i=0;$i<count($info);$i++)
    {
        $info[$i]['pubdate']=date("Y-m-d",$info[$i]['pubdate']);
    }
    echo json_encode($info);
}
//echo "SELECT title FROM wenzhang WHERE pubdate>=$qi AND pubdate<$zhong";